<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 skin-theme-clientpref-day vector-sticky-header-enabled" lang="de" dir="ltr"><head>
<meta charset="UTF-8">
<title>Math.h</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://de.wikipedia.org/wiki/Math.h"> <link href="./_mw_/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link href="./_mw_/ext.gadget.citeRef.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.defaultPlainlinks.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiCommonHide.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiCommonLayout.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiCommonStyle.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiDarkmode.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiResponsive.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.specialSearch.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Math_h rootpage-Math_h skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">math.h</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="de" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="de" dir="ltr"><p><b>math.h</b> ist eine <a href="Header-Datei" title="Header-Datei">Header-Datei</a> in der <a href="Standard_C_Library" class="mw-redirect" title="Standard C Library">Standard C Library</a> der <a href="C_(Programmiersprache)" title="C (Programmiersprache)">Programmiersprache C</a>. Sie wurde für mathematische Funktionen entwickelt. Die <a href="C%2B%2B" title="C++">Programmiersprache C++</a> benutzt die Funktionen ebenfalls, um die Kompatibilität von C zu C++ zu gewährleisten, und deklariert sie in der Header-Datei <b>cmath</b> (dort ohne die <a href="Dateinamenserweiterung" title="Dateinamenserweiterung">Dateinamenserweiterung</a> „.h“ verwendet).
</p><p>Alle Funktionen, die einen Winkel einlesen oder ausgeben, arbeiten mit <a href="Radiant_(Einheit)" title="Radiant (Einheit)">Radiant</a>. Die meisten Funktionen arbeiten mit <a href="Gleitkommazahlen" class="mw-redirect" title="Gleitkommazahlen">Gleitkommazahlen</a>. Mathematische Funktionen, die mit ganzzahligen Werten (<a href="Integer_(Datentyp)" title="Integer (Datentyp)">Integer</a>) arbeiten, wie abv, labs, div oder ldiv, sind stattdessen in der Header-Datei <a href="Stdlib.h" class="mw-redirect" title="Stdlib.h">stdlib.h</a> vertreten.
</p>
<div class="mw-heading mw-heading2"><h2 id="Funktionen_bis_C95">Funktionen bis C95</h2></div>
<p>In den Normen bis einschließlich <a href="C95" class="mw-disambig" title="C95">C95</a> waren die folgenden Funktionen <a href="Deklaration_(Programmierung)" title="Deklaration (Programmierung)">deklariert</a>.
</p>
<table class="wikitable">
<tbody><tr>
<th>Name</th>
<th>Beschreibung</th>
<th>Mathematische Formulierung
</th></tr>
<tr>
<td><code>acos</code></td>
<td><a href="Arkuskosinus" class="mw-redirect" title="Arkuskosinus">Arkuskosinus</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \arccos x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>arccos</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \arccos x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/c2f5e84a5218f798ae5d01f85cec659fbb6e3df2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:7.934ex; height:1.676ex;" alt="{\displaystyle \arccos x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>asin</code></td>
<td><a href="Arkussinus" class="mw-redirect" title="Arkussinus">Arkussinus</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \arcsin x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>arcsin</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \arcsin x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/8941574c0f224adeedae0f72bd48098116cc2068.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:7.679ex; height:2.176ex;" alt="{\displaystyle \arcsin x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>atan</code></td>
<td><a href="Arkustangens" class="mw-redirect" title="Arkustangens">Arkustangens</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \arctan x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>arctan</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \arctan x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/ea7315ab90c047f16ec0972c15e14988ed737c1f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:8.183ex; height:2.009ex;" alt="{\displaystyle \arctan x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>atan2</code></td>
<td><a href="Arctan2" title="Arctan2">„Arkustangens“ mit zwei Argumenten</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {atan2} (y,x)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>atan2</mi>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mi>y</mi>
<mo>,</mo>
<mi>x</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {atan2} (y,x)}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/cdf144c1f1dccdc6c0949ece514a77f3790530f7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.013ex; height:2.843ex;" alt="{\displaystyle \operatorname {atan2} (y,x)}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>ceil</code></td>
<td><a href="Aufrundungsfunktion" class="mw-redirect" title="Aufrundungsfunktion">Aufrundungsfunktion</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lceil x\rceil }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo fence="false" stretchy="false">⌈<!-- ⌈ --></mo>
<mi>x</mi>
<mo fence="false" stretchy="false">⌉<!-- ⌉ --></mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \lceil x\rceil }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/5ac7f37c8288700904b4a22a2f7c94d45ba917de.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.394ex; height:2.843ex;" alt="{\displaystyle \lceil x\rceil }" loading="lazy"></span>
</td></tr>
<tr>
<td><code>cos</code></td>
<td><a href="Kosinus" class="mw-redirect" title="Kosinus">Kosinus</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \cos x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>cos</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \cos x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/184ba70c3a71df25a25c09f34cd7f8175a9b5280.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:4.828ex; height:1.676ex;" alt="{\displaystyle \cos x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>cosh</code></td>
<td><a href="Kosinus_hyperbolicus" class="mw-redirect" title="Kosinus hyperbolicus">Kosinus hyperbolicus</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \cosh x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>cosh</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \cosh x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/aa23e796f0d4eae2439367502f387edfa6c4b559.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.12ex; height:2.176ex;" alt="{\displaystyle \cosh x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>exp</code></td>
<td><a href="Exponentialfunktion" title="Exponentialfunktion">Exponentialfunktion</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e^{x}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>e</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>x</mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle e^{x}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/841c0d168e64191c45a45e54c7e447defd17ec6a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.256ex; height:2.343ex;" alt="{\displaystyle e^{x}}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>fabs</code></td>
<td><a href="Betragsfunktion" title="Betragsfunktion">Betragsfunktion</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle |x|}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mi>x</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle |x|}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/4eb41e5fd5dc37eaa1718dfbf4bc082edb991936.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.623ex; height:2.843ex;" alt="{\displaystyle |x|}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>floor</code></td>
<td><a href="Ganzteilfunktion" class="mw-redirect" title="Ganzteilfunktion">Ganzteilfunktion</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor x\rfloor }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo fence="false" stretchy="false">⌊<!-- ⌊ --></mo>
<mi>x</mi>
<mo fence="false" stretchy="false">⌋<!-- ⌋ --></mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \lfloor x\rfloor }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/738c94c88678dd08a289f90a47a609ce44eedf14.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.394ex; height:2.843ex;" alt="{\displaystyle \lfloor x\rfloor }" loading="lazy"></span>
</td></tr>
<tr>
<td><code>fmod</code></td>
<td>Führt die <a href="Modulo" class="mw-redirect" title="Modulo">Modulo</a>-Funktion für Gleitkommazahlen durch</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x{\bmod {y}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>y</mi>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x{\bmod {y}}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/5474089d0852fe6509e9733a74de4a06f42cbd81.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:8.166ex; height:2.509ex;" alt="{\displaystyle x{\bmod {y}}}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>frexp</code></td>
<td>Teilt eine Gleitkommazahl in Faktor und Potenz mit der Basis 2 auf</td>
<td>
</td></tr>
<tr>
<td><code>ldexp</code></td>
<td>Multipliziert den ersten Parameter mit 2 um den zweiten Parameter potenziert</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x2^{y}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>y</mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x2^{y}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/514e67f46a21524a5372adc58462837b771f2e0b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.541ex; height:2.343ex;" alt="{\displaystyle x2^{y}}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>log</code></td>
<td><a href="Nat%C3%BCrlicher_Logarithmus" class="mw-redirect" title="Natürlicher Logarithmus">Natürlicher Logarithmus</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ln x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>ln</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \ln x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/ed172b0f5195382a3500c713941f945ad4db3898.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.656ex; height:2.176ex;" alt="{\displaystyle \ln x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>log10</code></td>
<td><a href="Logarithmus" title="Logarithmus">Logarithmus</a> zur Basis 10</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \log _{10}x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>log</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>10</mn>
</mrow>
</msub>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \log _{10}x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/4f174fa0b73f4f350aff3b5d44cb831dcabfcea5.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.565ex; height:2.676ex;" alt="{\displaystyle \log _{10}x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>modf</code></td>
<td>Teilt eine Gleitkommazahl in zwei Zahlen auf, vor und nach dem Komma</td>
<td>
</td></tr>
<tr>
<td><code>pow</code></td>
<td>Potenziert ersten mit dem zweiten Parameter</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x^{y}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>x</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>y</mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x^{y}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/c8561c712e86598255e8434a70affa18ffd7e0dd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.379ex; height:2.343ex;" alt="{\displaystyle x^{y}}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>sin</code></td>
<td><a href="Sinus" class="mw-redirect" title="Sinus">Sinus</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sin x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>sin</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \sin x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/09b4b55580d6a821a07ad9fe35be88976917b10b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:4.572ex; height:2.176ex;" alt="{\displaystyle \sin x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>sinh</code></td>
<td><a href="Sinus_hyperbolicus" class="mw-redirect" title="Sinus hyperbolicus">Sinus hyperbolicus</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sinh x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>sinh</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \sinh x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/aa855e59efeb97e8146142f9aa3414fca17f24a8.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.865ex; height:2.176ex;" alt="{\displaystyle \sinh x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>sqrt</code></td>
<td><a href="Quadratwurzel" title="Quadratwurzel">Quadratwurzel</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\sqrt {x}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<msqrt>
<mi>x</mi>
</msqrt>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\sqrt {x}}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/d62b24be305beff66cba9bfbcc01a362ba390f44.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:3.266ex; height:3.009ex;" alt="{\displaystyle {\sqrt {x}}}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>tan</code></td>
<td><a href="Tangens" class="mw-redirect" title="Tangens">Tangens</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \tan x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>tan</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \tan x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/3983a722002d77dd3d0babab871c50488aef9f4b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.076ex; height:2.009ex;" alt="{\displaystyle \tan x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>tanh</code></td>
<td><a href="Tangens_hyperbolicus" class="mw-redirect" title="Tangens hyperbolicus">Tangens hyperbolicus</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \tanh x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>tanh</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \tanh x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/d0be1dd47ba059a32307fa7dbcf98c0877931e39.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.369ex; height:2.176ex;" alt="{\displaystyle \tanh x}" loading="lazy"></span>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="C99-Funktionen">C99-Funktionen</h2></div>
<p>Mit der Norm <a href="Varianten_der_Programmiersprache_C#C99" title="Varianten der Programmiersprache C">C99</a> wurde math.h um die folgenden Funktionen erweitert.
</p>
<table class="wikitable">
<tbody><tr>
<th>Name</th>
<th>Beschreibung</th>
<th>Mathematische Formulierung
</th></tr>
<tr>
<td><code>acosh</code></td>
<td><a href="Areakosinus_hyperbolicus" class="mw-redirect" title="Areakosinus hyperbolicus">Areakosinus hyperbolicus</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {arcosh} x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>arcosh</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {arcosh} x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/6f3d1be50bda0a00cb4354fce22fd95826dd8b73.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:8.194ex; height:2.176ex;" alt="{\displaystyle \operatorname {arcosh} x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>asinh</code></td>
<td><a href="Areasinus_hyperbolicus" class="mw-redirect" title="Areasinus hyperbolicus">Areasinus hyperbolicus</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {arsinh} x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>arsinh</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {arsinh} x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/7ae4dd27fb2ea192a32d2dc919170dd6028efec2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:7.939ex; height:2.176ex;" alt="{\displaystyle \operatorname {arsinh} x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>atanh</code></td>
<td><a href="Areatangens_hyperbolicus" class="mw-redirect" title="Areatangens hyperbolicus">Areatangens hyperbolicus</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {artanh} x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>artanh</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {artanh} x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/00e5332b77be1339db02748afcf70ce1814d5819.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:8.443ex; height:2.176ex;" alt="{\displaystyle \operatorname {artanh} x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>cbrt</code></td>
<td><a href="Kubikwurzel" class="mw-redirect" title="Kubikwurzel">Kubikwurzel</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\sqrt[{3}]{x}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mroot>
<mi>x</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</mroot>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\sqrt[{3}]{x}}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/9a55f866116e7a86823816615dd98fcccde75473.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:3.266ex; height:3.009ex;" alt="{\displaystyle {\sqrt[{3}]{x}}}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>copysign(<i>x</i>,<i>y</i>)</code></td>
<td>gibt den Wert von <i>x</i> mit dem <a href="Vorzeichen_(Zahl)" title="Vorzeichen (Zahl)">Vorzeichen</a> von <i>y</i> zurück</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle |x|\cdot \operatorname {sgn} y}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mi>x</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mo>⋅<!-- ⋅ --></mo>
<mi>sgn</mi>
<mo><!-- --></mo>
<mi>y</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle |x|\cdot \operatorname {sgn} y}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/864bf1745e3b357db2efa46e35b0da138095dcf2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.216ex; height:2.843ex;" alt="{\displaystyle |x|\cdot \operatorname {sgn} y}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>erf</code></td>
<td><a href="Fehlerfunktion" title="Fehlerfunktion">Fehlerfunktion</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {erf} x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>erf</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {erf} x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/6c9492274d2fe126ec8ef9a028146c3a8c5d15c1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:4.373ex; height:2.176ex;" alt="{\displaystyle \operatorname {erf} x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>erfc</code></td>
<td>Gibt den Komplementärfehler von <i>x</i> zurück</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {erfc} x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>erfc</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {erfc} x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/c788f0f7067de6a89afd2c7060b9bc7361e170ff.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.405ex; height:2.176ex;" alt="{\displaystyle \operatorname {erfc} x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>exp2(<i>x</i>)</code></td>
<td>Potenziert 2 mit dem übergebenen Parameter</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2^{x}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>x</mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 2^{x}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/5514b506cd3af97484bca3e166965ac4cef27a02.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.335ex; height:2.343ex;" alt="{\displaystyle 2^{x}}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>expm1(<i>x</i>)</code></td>
<td>Liefert den Wert von <i>exp()-1</i> zurück</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e^{x}-1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>e</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>x</mi>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle e^{x}-1}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/9098adf157cfb3697609aaa10d9e3b4ec875d1a0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:6.259ex; height:2.509ex;" alt="{\displaystyle e^{x}-1}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>fdim(<i>x</i>,<i>y</i>)</code></td>
<td>Positive Differenz</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \max(0,x-y)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo movablelimits="true" form="prefix">max</mo>
<mo stretchy="false">(</mo>
<mn>0</mn>
<mo>,</mo>
<mi>x</mi>
<mo>−<!-- − --></mo>
<mi>y</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \max(0,x-y)}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/bff0c099571a996aecd20489c2f8e06f0fe39c37.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.657ex; height:2.843ex;" alt="{\displaystyle \max(0,x-y)}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>fma(<i>x</i>,<i>y</i>,<i>z</i>)</code></td>
<td>Multipliziert und Addiert</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle xy+z}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
<mi>y</mi>
<mo>+</mo>
<mi>z</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle xy+z}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/b0f4dce10ae11805720ae31cb909677fa91508bf.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.414ex; height:2.343ex;" alt="{\displaystyle xy+z}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>fmax(<i>x</i>,<i>y</i>)</code></td>
<td>Maximum</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \max(x,y)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo movablelimits="true" form="prefix">max</mo>
<mo stretchy="false">(</mo>
<mi>x</mi>
<mo>,</mo>
<mi>y</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \max(x,y)}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/bdfabf5470a3def2e2e1f13274b355552635117c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.654ex; height:2.843ex;" alt="{\displaystyle \max(x,y)}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>fmin(<i>x</i>,<i>y</i>)</code></td>
<td>Minimum</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \min(x,y)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo movablelimits="true" form="prefix">min</mo>
<mo stretchy="false">(</mo>
<mi>x</mi>
<mo>,</mo>
<mi>y</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \min(x,y)}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/71472d48b4b5dd9ea6da30eaf525d5890e480561.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.204ex; height:2.843ex;" alt="{\displaystyle \min(x,y)}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>hypot(<i>x</i>,<i>y</i>)</code></td>
<td><a href="Hypotenuse" class="mw-redirect" title="Hypotenuse">Hypotenuse</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\sqrt {(x^{2}+y^{2})}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<msqrt>
<mo stretchy="false">(</mo>
<msup>
<mi>x</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo>+</mo>
<msup>
<mi>y</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo stretchy="false">)</mo>
</msqrt>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\sqrt {(x^{2}+y^{2})}}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/fde69dd8cdc248fe8bfa4ee5bb3af8335241f11c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.671ex; width:11.572ex; height:4.843ex;" alt="{\displaystyle {\sqrt {(x^{2}+y^{2})}}}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>ilogb</code></td>
<td>wie <code>logb</code>, gibt allerdings <code>int</code> zurück</td>
<td><code>(int)logb(x)</code>
</td></tr>
<tr>
<td><code>lgamma</code></td>
<td>Logarithmus der <a href="Gammafunktion" title="Gammafunktion">Gammafunktion</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ln |\Gamma (x)|}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>ln</mi>
<mo><!-- --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mi mathvariant="normal">Γ<!-- Γ --></mi>
<mo stretchy="false">(</mo>
<mi>x</mi>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \ln |\Gamma (x)|}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/d2f8ca9d91ccf904b3dbd9069899fefc75cc527d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.212ex; height:2.843ex;" alt="{\displaystyle \ln |\Gamma (x)|}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>llrint</code></td>
<td>Rundungsfunktion</td>
<td>
</td></tr>
<tr>
<td><code>lrint</code></td>
<td>Rundungsfunktion</td>
<td>
</td></tr>
<tr>
<td><code>llround</code></td>
<td>Rundungsfunktion</td>
<td>
</td></tr>
<tr>
<td><code>lround</code></td>
<td>Rundungsfunktion</td>
<td>
</td></tr>
<tr>
<td><code>log1p(<i>x</i>)</code></td>
<td><a href="Nat%C3%BCrlicher_Logarithmus" class="mw-redirect" title="Natürlicher Logarithmus">Natürlicher Logarithmus</a> von 1 + <i>x</i></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ln(1+x)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>ln</mi>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mn>1</mn>
<mo>+</mo>
<mi>x</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \ln(1+x)}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/c16ccd97dc2eaef5ce6d8b7bc593a0e2dbd3dca4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.081ex; height:2.843ex;" alt="{\displaystyle \ln(1+x)}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>log2</code></td>
<td><a href="Logarithmus" title="Logarithmus">Logarithmus</a> zur Basis 2</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {lb} x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>lb</mi>
<mo><!-- --></mo>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {lb} x}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/13da57b305fe2ac95b3106988087b4bea77491ec.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.656ex; height:2.176ex;" alt="{\displaystyle \operatorname {lb} x}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>logb</code></td>
<td>Liefert den ganzzahligen Exponenten einer Gleitkommazahl als Gleitkommazahl</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {rint} (\log _{\mathrm {FLT\_RADIX} }|x|)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>rint</mi>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<msub>
<mi>log</mi>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">F</mi>
<mi mathvariant="normal">L</mi>
<mi mathvariant="normal">T</mi>
<mi mathvariant="normal">_<!-- _ --></mi>
<mi mathvariant="normal">R</mi>
<mi mathvariant="normal">A</mi>
<mi mathvariant="normal">D</mi>
<mi mathvariant="normal">I</mi>
<mi mathvariant="normal">X</mi>
</mrow>
</mrow>
</msub>
<mo><!-- --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mi>x</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {rint} (\log _{\mathrm {FLT\_RADIX} }|x|)}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/608de0075931b5bfc6146b52a6775df0abc9534e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:21.412ex; height:2.843ex;" alt="{\displaystyle \operatorname {rint} (\log _{\mathrm {FLT\_RADIX} }|x|)}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>nan(<i>s</i>)</code></td>
<td>Ein <a href="NaN" title="NaN">NaN</a> erzeugen</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0/0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>0</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 0/0}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/f1260a93f6fb76e30f25d5633b42e39e2c2fda79.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.487ex; height:2.843ex;" alt="{\displaystyle 0/0}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>nearbyint</code></td>
<td>Rundet Gleitkommazahlen zum nächsten Integer</td>
<td>
</td></tr>
<tr>
<td><code>nextafter(<i>x</i>,<i>y</i>)</code></td>
<td>Gibt die nächst darstellbare Zahl nach <i>x</i> (Richtung <i>y</i>) zurück</td>
<td>
</td></tr>
<tr>
<td><code>nexttoward(<i>x</i>,<i>y</i>)</code></td>
<td>Wie <code>nextafter</code>, außer dass <i>y</i> als <code>long double</code> übergeben wird</td>
<td>
</td></tr>
<tr>
<td><code>remainder(<i>x</i>,<i>y</i>)</code></td>
<td>Rest einer Division</td>
<td>
</td></tr>
<tr>
<td><code>remquo(<i>x</i>,<i>y</i>,<i>p</i>)</code></td>
<td>Genauso wie <code>remainder</code>, speichert jedoch den Quotienten (als <code>int</code>) als Ziel des Zeigers <i>p</i></td>
<td>
</td></tr>
<tr>
<td><code>rint</code></td>
<td>Rundet je nach Rundungsmodus zum nächsten Integer, gibt eine Gleitkommazahl zurück</td>
<td>
</td></tr>
<tr>
<td><code>round</code></td>
<td>kaufmännische Rundungsfunktion</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor x+0{,}5\rfloor }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo fence="false" stretchy="false">⌊<!-- ⌊ --></mo>
<mi>x</mi>
<mo>+</mo>
<mn>0</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>,</mo>
</mrow>
<mn>5</mn>
<mo fence="false" stretchy="false">⌋<!-- ⌋ --></mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \lfloor x+0{,}5\rfloor }</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/0499d9915c1ac7dfcf53228d939125d42a2a3355.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.207ex; height:2.843ex;" alt="{\displaystyle \lfloor x+0{,}5\rfloor }" loading="lazy"></span>
</td></tr>
<tr>
<td><code>scalbln(<i>x</i>,<i>y</i>)</code></td>
<td><i>x</i> * <code>FLT_RADIX</code><sup><i>y</i></sup> (<i>y</i> ist <code>long</code>)</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x\cdot \mathrm {FLT\_RADIX} ^{y}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">F</mi>
<mi mathvariant="normal">L</mi>
<mi mathvariant="normal">T</mi>
<mi mathvariant="normal">_<!-- _ --></mi>
<mi mathvariant="normal">R</mi>
<mi mathvariant="normal">A</mi>
<mi mathvariant="normal">D</mi>
<mi mathvariant="normal">I</mi>
<mi mathvariant="normal">X</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>y</mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x\cdot \mathrm {FLT\_RADIX} ^{y}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/4e06eaf449b0f075c5f6cbc8bd13b8a2b0081a8d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:17.681ex; height:2.343ex;" alt="{\displaystyle x\cdot \mathrm {FLT\_RADIX} ^{y}}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>scalbn(<i>x</i>,<i>y</i>)</code></td>
<td><i>x</i> * <code>FLT_RADIX</code><sup><i>y</i></sup> (<i>y</i> ist <code>int</code>)</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x\cdot \mathrm {FLT\_RADIX} ^{y}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">F</mi>
<mi mathvariant="normal">L</mi>
<mi mathvariant="normal">T</mi>
<mi mathvariant="normal">_<!-- _ --></mi>
<mi mathvariant="normal">R</mi>
<mi mathvariant="normal">A</mi>
<mi mathvariant="normal">D</mi>
<mi mathvariant="normal">I</mi>
<mi mathvariant="normal">X</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>y</mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x\cdot \mathrm {FLT\_RADIX} ^{y}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/4e06eaf449b0f075c5f6cbc8bd13b8a2b0081a8d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:17.681ex; height:2.343ex;" alt="{\displaystyle x\cdot \mathrm {FLT\_RADIX} ^{y}}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>tgamma</code></td>
<td><a href="Gammafunktion" title="Gammafunktion">Gammafunktion</a></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Gamma (x)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi mathvariant="normal">Γ<!-- Γ --></mi>
<mo stretchy="false">(</mo>
<mi>x</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \Gamma (x)}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/ec077ba0bdbf87c0d66173bc4d98598fe582ac37.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.592ex; height:2.843ex;" alt="{\displaystyle \Gamma (x)}" loading="lazy"></span>
</td></tr>
<tr>
<td><code>trunc</code></td>
<td>Beschneidet eine Gleitkommazahl, d. h. rundet „Richtung Null“</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{cases}\lfloor x\rfloor ,&x\geq 0\\\lceil x\rceil ,&x<0\end{cases}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>{</mo>
<mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false">
<mtr>
<mtd>
<mo fence="false" stretchy="false">⌊<!-- ⌊ --></mo>
<mi>x</mi>
<mo fence="false" stretchy="false">⌋<!-- ⌋ --></mo>
<mo>,</mo>
</mtd>
<mtd>
<mi>x</mi>
<mo>≥<!-- ≥ --></mo>
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mo fence="false" stretchy="false">⌈<!-- ⌈ --></mo>
<mi>x</mi>
<mo fence="false" stretchy="false">⌉<!-- ⌉ --></mo>
<mo>,</mo>
</mtd>
<mtd>
<mi>x</mi>
<mo><</mo>
<mn>0</mn>
</mtd>
</mtr>
</mtable>
<mo fence="true" stretchy="true" symmetric="true"></mo>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{cases}\lfloor x\rfloor ,&x\geq 0\\\lceil x\rceil ,&x<0\end{cases}}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/56df9742ef887d39200ff56865347b5d7e36861b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:14.449ex; height:6.176ex;" alt="{\displaystyle {\begin{cases}\lfloor x\rfloor ,&x\geq 0\\\lceil x\rceil ,&x<0\end{cases}}}" loading="lazy"></span>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="Beispiel">Beispiel</h2></div>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="1"></span><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdio.h></span>
<span class="linenos" data-line="2"></span><span class="cp">#include</span><span class="w"> </span><span class="cpf"><math.h></span>
<span class="linenos" data-line="3"></span>
<span class="linenos" data-line="4"></span><span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="linenos" data-line="5"></span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">4</span><span class="p">;</span>
<span class="linenos" data-line="6"></span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pow</span><span class="p">(</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">);</span>
<span class="linenos" data-line="7"></span><span class="w"> </span><span class="n">printf</span><span class="p">(</span><span class="s">"%f hoch %f ist %f</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">);</span>
<span class="linenos" data-line="8"></span><span class="p">}</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="Weblinks">Weblinks</h2></div>
<ul><li><span class="cite"><a rel="nofollow" class="external text" href="https://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf"><i>Rationale for International Standard – Programming Languages – C.</i></a> (PDF, 898 kB)<span class="Abrufdatum"> Abgerufen am 4. September 2011</span> (C99).</span><span style="display: none;" class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&rfr_id=info%3Asid%2Fde.wikipedia.org%3AMath.h&rft.title=Rationale+for+International+Standard+%E2%80%93+Programming+Languages+%E2%80%93+C&rft.description=Rationale+for+International+Standard+%E2%80%93+Programming+Languages+%E2%80%93+C&rft.identifier=https%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg14%2Fwww%2FC99RationaleV5.10.pdf"> </span></li>
<li><a rel="nofollow" class="external text" href="https://cplusplus.com/reference/cmath/">Beschreibung auf cplusplus.com</a> (englisch)</li>
<li><style data-mw-deduplicate="TemplateStyles:r261891140">
/* start https://de.wikipedia.org/ */
.mw-parser-output .webarchiv-memento a{color:inherit}
/* end https://de.wikipedia.org/ */
</style><a rel="nofollow" class="external text" href="https://web.archive.org/web/20100221150215/http://www.dinkumware.com/manuals/default.aspx?manual=compleat&page=math.html">Dokumentation von math.h auf dinkumware.com</a> (<span class="webarchiv-memento"><a href="Webarchivierung#Begrifflichkeiten" title="Webarchivierung">Memento</a></span> vom 21. Februar 2010 im <i><a href="Internet_Archive" title="Internet Archive">Internet Archive</a></i>)</li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
Dieser Artikel wurde von <a class="external text" title="Zuletzt bearbeitet am 2023-10-16" href="https://de.wikipedia.org/wiki/?title=Math.h&oldid=238214655">Wikipedia</a> herausgegeben. Der Text ist unter <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.de">Creative Commons Attribution-Share Alike 4.0</a> verfügbar, sofern nicht anders angegeben. Für die Mediendateien können zusätzliche Bedingungen gelten.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="./_webp_/webpHandler.js"></script>
</body></html>